<?php
require_once ("../db/connectdatabase.php");

function insertInfoTuyenDung($id, $tieude, $noidung) {
	$con = new ConnectDB();
	$tbl = "recruitmenttaichinh";
	$fn = array('reid' => $id, 'retitle' => $tieude, 'recontent' => $noidung, 'datecreate' => time());
	return $con -> insert($tbl, $fn);
}

function updateInfoTuyenDung($id, $tieude, $noidung) {
	$con = new ConnectDB();
	$tbl = "recruitmenttaichinh";
	$fn = array( 'retitle' => $tieude, 'recontent' => $noidung);
	$condition = array('reid' => $id);
	return $con -> update($tbl, $fn, $condition);
}

function deleteInfoTuyenDung($idnew) {
	$con = new ConnectDB();
	$tbl = "recruitmenttaichinh";
	$condition = array('reid' => $idnew);
	return $con -> delete($tbl, $condition);
}

function updateIntro($content, $confoot) {
	$con = new ConnectDB();
	$tbl = "loan_intro_footer";
	$fn = array('header' => $content, 'footer' => $confoot, 'datecreate' => time());
	$condition = array('id' => 'infotuyendung');
	return $con -> update($tbl, $fn, $condition);
}
?>